total_people = 3
for i in range(total_people):
    try:
        power, hours = map(float, input(f"请输入第 {i + 1} 个人的用电功率（w）和用电时长（h），用空格分隔: ").split())
        consumption = (power * hours) / 1000
        print(f"第 {i + 1} 个人的每月用电量是 {consumption} kw•h")
    except ValueError:
        print("输入无效，请输入两个有效的数字。")